using System.Collections.Generic;
using System.Linq;
using Microsoft.TeamFoundation.WorkItemTracking.Client;

namespace TFS.Kanban.VS2010
{
    public class ReadWorkItemTypeService
    {
        public IEnumerable<WorkItemType> GetWorkItemTypes(Project project, WorkItemStore workItemStore)
        {
            //var project = workItemStore.Projects.Cast<Project>().FirstOrDefault(x => x.Id == this.SelectedProject.Id);
            return project.WorkItemTypes.Cast<WorkItemType>();

                //foreach (FieldDefinition fieldDefinition in workItemType.FieldDefinitions)
                //{
                //    this.WorkItemTypes.Add(string.Format("{0} - {1} {2}", workItemType.Name, fieldDefinition.Id, fieldDefinition.Name));
                //}
        }
    }
}